package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName mbs_order
 */
@ApiModel(description = "")
@TableName(value ="mbs_order")
@Data
public class Order implements Serializable {
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer couponId;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer payStyle;
    /**
     * 订单ID
     */
    @ApiModelProperty("订单ID")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 客户ID
     */
    @ApiModelProperty("客户ID")
    private Integer memberId;

    /**
     * 车辆ID
     */
    @ApiModelProperty("车辆ID")
    private Integer carId;

    /**
     * 开始时间
     */
    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endTime;

    /**
     * 租出门店
     */
    @ApiModelProperty("租出门店")
    private Integer brrowShop;

    @ApiModelProperty("总金额")
    @TableField(exist = false)
    private Double totalPrices;

    /**
     * 归还门店
     */
    @ApiModelProperty("归还门店")
    private Integer returnShop;

    /**
     * 总金额
     */
    @ApiModelProperty("总金额")
    private Double totalPrice;

    /**
     * 预付金额
     */
    @ApiModelProperty("预付金额")
    private Double preparidAmount;

    /**
     * 订单状态（输入Entered1，提交Booked2，预约Reserved3，使用中Inuse4，交还Returned5，取消Cancelled6）
     */
    @ApiModelProperty("订单状态（输入Entered1，提交Booked2，预约Reserved3，使用中Inuse4，交还Returned5，取消Cancelled6）")
    private Integer state;

    /**
     * 是否送车上门
     */
    @ApiModelProperty("是否送车上门")
    private String isgetcarathome;

    /**
     * 上门地址ID
     */
    @ApiModelProperty("上门地址ID")
    private String getcarlocation;

    /**
     * 是否上门还车
     */
    @ApiModelProperty("是否上门还车")
    private String isreturncarathome;

    /**
     * 上门地址ID
     */
    @ApiModelProperty("上门地址ID")
    private String returncarlocation;

    /**
     * 
     */
    @ApiModelProperty("")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date addtime;

    /**
     * 
     */
    @ApiModelProperty("")
    private String orderno;

    /**
     * 车辆押金
     */
    @ApiModelProperty("车辆押金")
    private Double carDeposit;

    /**
     * 违章押金
     */
    @ApiModelProperty("违章押金")
    private Double violationDeposit;

    /**
     * 维修信息id
     */
    @ApiModelProperty("维修信息id")
    private Integer mrId;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Member member;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Car car;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String username;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer cstate;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String carName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Shop shop;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sname;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String idType;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String address;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String coverImg;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMemberId() == null ? other.getMemberId() == null : this.getMemberId().equals(other.getMemberId()))
            && (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getBrrowShop() == null ? other.getBrrowShop() == null : this.getBrrowShop().equals(other.getBrrowShop()))
            && (this.getReturnShop() == null ? other.getReturnShop() == null : this.getReturnShop().equals(other.getReturnShop()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getPreparidAmount() == null ? other.getPreparidAmount() == null : this.getPreparidAmount().equals(other.getPreparidAmount()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getIsgetcarathome() == null ? other.getIsgetcarathome() == null : this.getIsgetcarathome().equals(other.getIsgetcarathome()))
            && (this.getGetcarlocation() == null ? other.getGetcarlocation() == null : this.getGetcarlocation().equals(other.getGetcarlocation()))
            && (this.getIsreturncarathome() == null ? other.getIsreturncarathome() == null : this.getIsreturncarathome().equals(other.getIsreturncarathome()))
            && (this.getReturncarlocation() == null ? other.getReturncarlocation() == null : this.getReturncarlocation().equals(other.getReturncarlocation()))
            && (this.getAddtime() == null ? other.getAddtime() == null : this.getAddtime().equals(other.getAddtime()))
            && (this.getOrderno() == null ? other.getOrderno() == null : this.getOrderno().equals(other.getOrderno()))
            && (this.getCarDeposit() == null ? other.getCarDeposit() == null : this.getCarDeposit().equals(other.getCarDeposit()))
            && (this.getViolationDeposit() == null ? other.getViolationDeposit() == null : this.getViolationDeposit().equals(other.getViolationDeposit()))
            && (this.getMrId() == null ? other.getMrId() == null : this.getMrId().equals(other.getMrId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMemberId() == null) ? 0 : getMemberId().hashCode());
        result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getBrrowShop() == null) ? 0 : getBrrowShop().hashCode());
        result = prime * result + ((getReturnShop() == null) ? 0 : getReturnShop().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getPreparidAmount() == null) ? 0 : getPreparidAmount().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getIsgetcarathome() == null) ? 0 : getIsgetcarathome().hashCode());
        result = prime * result + ((getGetcarlocation() == null) ? 0 : getGetcarlocation().hashCode());
        result = prime * result + ((getIsreturncarathome() == null) ? 0 : getIsreturncarathome().hashCode());
        result = prime * result + ((getReturncarlocation() == null) ? 0 : getReturncarlocation().hashCode());
        result = prime * result + ((getAddtime() == null) ? 0 : getAddtime().hashCode());
        result = prime * result + ((getOrderno() == null) ? 0 : getOrderno().hashCode());
        result = prime * result + ((getCarDeposit() == null) ? 0 : getCarDeposit().hashCode());
        result = prime * result + ((getViolationDeposit() == null) ? 0 : getViolationDeposit().hashCode());
        result = prime * result + ((getMrId() == null) ? 0 : getMrId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", memberId=").append(memberId);
        sb.append(", carId=").append(carId);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", brrowShop=").append(brrowShop);
        sb.append(", returnShop=").append(returnShop);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", preparidAmount=").append(preparidAmount);
        sb.append(", state=").append(state);
        sb.append(", isgetcarathome=").append(isgetcarathome);
        sb.append(", getcarlocation=").append(getcarlocation);
        sb.append(", isreturncarathome=").append(isreturncarathome);
        sb.append(", returncarlocation=").append(returncarlocation);
        sb.append(", addtime=").append(addtime);
        sb.append(", orderno=").append(orderno);
        sb.append(", carDeposit=").append(carDeposit);
        sb.append(", violationDeposit=").append(violationDeposit);
        sb.append(", mrId=").append(mrId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}